create table TourFull
(
	 [TourFullId] int identity(1, 1) primary key
	,[TourId] int
	,[TourPackageId] int
	,[CreatedBy] int
	,[CreatedDate] datetime
	,[UpdatedBy] int
	,[UpdatedDate] datetime
	,[Status] int
)
go

CREATE PROCEDURE TourFullGet
	@TourFullId int
AS
SELECT *
FROM [TourFull]
WHERE [TourFull].[TourFullId] = @TourFullId
GO

CREATE PROCEDURE TourFullList
AS
SELECT *
FROM [TourFull]
ORDER BY TourFullId DESC
GO

CREATE PROCEDURE TourFullInsert
	@TourId int
	,@TourPackageId int
	,@CreatedBy int
	,@CreatedDate datetime
	,@UpdatedBy int
	,@UpdatedDate datetime
	,@Status int
AS

INSERT INTO TourFull (
	 [TourId]
	,[TourPackageId]
	,[CreatedBy]
	,[CreatedDate]
	,[UpdatedBy]
	,[UpdatedDate]
	,[Status]
	
) VALUES (
	 @TourId
	,@TourPackageId
	,@CreatedBy
	,@CreatedDate
	,@UpdatedBy
	,@UpdatedDate
	,@Status
	
)

select SCOPE_IDENTITY()
GO

CREATE PROCEDURE TourFullUpdate
	@TourFullId int, 
	@TourId int, 
	@TourPackageId int, 
	@CreatedBy int, 
	@CreatedDate datetime, 
	@UpdatedBy int, 
	@UpdatedDate datetime, 
	@Status int 

AS

UPDATE TourFull SET
	   [TourId] = @TourId
	   ,[TourPackageId] = @TourPackageId
	   ,[CreatedBy] = @CreatedBy
	   ,[CreatedDate] = @CreatedDate
	   ,[UpdatedBy] = @UpdatedBy
	   ,[UpdatedDate] = @UpdatedDate
	   ,[Status] = @Status
WHERE [TourFull].[TourFullId] = @TourFullId
GO

CREATE PROCEDURE TourFullDelete
	@TourFullId int 
AS
DELETE FROM TourFull
WHERE [TourFull].[TourFullId] = @TourFullId
GO
